package com.sam.gui.activity;

import android.content.Intent;
import android.os.Bundle;
import android.webkit.JavascriptInterface;

import com.sam.gui.base.BaseWebActivity;
import com.sam.ui.base.activity.BaseActivity;

/**
 * Created by Administrator on 2015-10-27.
 */
public class RegisterWebActivity extends BaseWebActivity {

    @Override
    protected void initView() {
        super.initView();
        Bundle extras = getIntent().getExtras();
        String type = extras.getString("type");
        setContentUrl("index.php?c=user&a=reg&platform=android&version="+"&type="+type);
    }

    @JavascriptInterface
    public void regSucces(){
        Intent intent = new Intent(this, RegisterUserInfoWebActivity.class);
        startActivity(intent);
        finish();
    }

    @JavascriptInterface
    public void xy(String type){
        if(type.equals("2")){
            Intent intent = new Intent(this, DoctorTermsOfUseWebActivity.class);
            startActivity(intent);
        }
        if(type.equals("1")){
            Intent intent = new Intent(this, UserTermsOfUseWebActivity.class);
            startActivity(intent);
        }

    }
}
